class Solution(object):
    def cellsInRange(self, s):
        out = []
        rol1 = int(s[1])
        rol2 = int(s[4])
        col1 = ord(s[0]) - ord('A')
        col2 = ord(s[3]) - ord('A')
        for col in range(col1, col2 + 1):
            for row in range(rol1, rol2 + 1):
                out.append(chr(col + ord('A')) + str(row))
        return out
